package com.feng.common.enums;

import lombok.AllArgsConstructor;

/**
 * @author feng
 * @describe
 */
@AllArgsConstructor
public enum QuTypeEnum {
    //单选     多选      判断      简答
    RADIO(1), MULTI(2), JUDGE(3), JDT(4);

    private final Integer type;

    public Integer getType() {
        return type;
    }


    public static QuTypeEnum getByType(Integer type) {
        for(QuTypeEnum e : QuTypeEnum.values()){
            if(e.getType().equals(type)){
                return e;
            }
        }
        throw new IllegalStateException("Unexpected value: " + type);
    }

}
